The Accordion Pane Component > FAccordionPane.getSelectedItem()

 

FAccordionPane.getSelectedItem()

Availability

Flash Player 6.

Usage

myAccordion_acp.getSelectedItem ()

Parameters

none

Returns


Returns an Object representing the currently selected item. The object will have two properties, label and linkage, which contains information about the specified section.

Description

Returns an Object representing the currently selected item. The object will have two properties, label and linkage, which contains information about the specified section.

 

Example

The following code add four sections to the accordion pane component, sets the selected item to the third item, and then traces its label.

	var sections = ["Section 1","Section 2","Section 3","Section 4"];
	myAccordionPane_acp.setDataProvider(sections);
	myAccordionPane_acp.setSelectedIndex(2);

	var item = myAccordionPane_acp.getSelectedItem();
	trace("Selected Item: "+item.label); //traces "Selected Item: Section 3"

 

See also

FAccordionPane.removeItemAt()